home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 8_12.lha / 8_12 / 8_12a4.c < prev    next >
Text File  |  1993-08-08  |  613b  |  24 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / Reset get pointer to point to the
  6. / beginning of the buffer. Set the state
  7. / flag to indicate that get() calls
  8. / need to be buffered.
  9. oid extrabuf::setbuffering()
  10.  
  11. / cerr << "setbuffering() invoked\n";    // DELETE
  12. / cerr << "\tgptr=" << form("%#x", gptr) << "\n";
  13. / cerr << "\tbase=" << form("%#x", base) << "\n";
  14.    dobuffering = 1;
  15.    if (gptr != base)
  16. {
  17. int length = pptr - gptr;
  18. if (length > 0)
  19.     memmove(base, gptr, length);
  20. gptr = base;
  21. pptr = base + length;
  22. }
  23.  
  24.